#ifndef __SOUNDMGR_H__
#define __SOUNDMGR_H__
#include "cocos2d.h"

#include "fmod.hpp"
#include "fmod_errors.h"
#include <string>
#include <list>
using std::list;
using std::string;

class GameSoundMgr : public cocos2d::CCObject
{
public:
	GameSoundMgr();
	~GameSoundMgr();

	static GameSoundMgr* getInstance();

	bool init();

	void update(float dt);

	void playEffect(const char* pStrFilePath, bool bLoop = false);

	void removeSound(FMOD::Sound* sound);

	void playBackgroundMusic(const char* pStrFilePath, bool bLoop = false);

private:
	void play(const char* pStrFilePath, bool bLoop);

private:
	FMOD::System* m_pSystem;
	std::list<FMOD::Sound*> lt;
	std::string m_bgMusic;
};

#endif